﻿using System.Collections.Generic;
using Baik.Interface.Execution;
using Baik.Interface.Framework;

namespace Baik.Execution
{
    public class FalseValue : BuiltInObject, IFalse
    {
        public FalseValue(IInjector inject) : base(inject)
        {
            this.Assign("toString",  BuiltInFactory.Function(inject, ToIString));
        }
        private IObject ToIString(IEnumerable<IObject> arg)
        {
            var rtn = Inject.Instantiate<IString>();
            rtn.Value = "false";
            return rtn;
        }

        public override string AsString()
        {
            return "false";
        }

        public bool Value { get; set; }
    }
}